/*
 * @Author:
 * @Date: 2023-06-27 10:52:46
 * @LastEditors:
 * @LastEditTime: 2023-06-27 14:17:52
 * @FilePath: \immoka-admin\src\api\decorate.js
 * @Description:
 *
 * Copyright (c) 2023 by ${git_name} , All Rights Reserved.
 */
import request from '@/utils/request'

// 装饰列表
export function listData(query) {
    return request({
        url: '/api/couple/decorate/product',
        method: 'get',
        params: query
    })
}

// 添加合成礼物
export function decorateType(query) {
    return request({
        url: '/api/couple/decorate/type',
        method: 'get',
        params: query
    })
}

// 新增装饰类别
export function postDecorateType(query) {
    return request({
        url: '/api/couple/decorate/type',
        method: 'post',
        data: query
    })
}
// 编辑装饰类别
export function putDecorateType(query) {
    return request({
        url: `/api/couple/decorate/type/${query.id}`,
        method: 'put',
        data: query
    })
}

// /api/couple/decorate/type/{id}
export function delDecorateType(id) {
    return request({
        url: `/api/couple/decorate/type/${id}`,
        method: 'delete'
    })
}

// 创建装饰
export function addDecorateProduct(query) {
    return request({
        url: `/api/couple/decorate/product`,
        method: 'post',
        data: query
    })
}

// 编辑装饰
export function editDecorateProduct(query) {
    return request({
        url: `/api/couple/decorate/product/${query.id}`,
        method: 'put',
        data: query
    })
}
// 删除装饰
export function delDecorateProduct(id) {
    return request({
        url: `/api/couple/decorate/product/${id}`,
        method: 'delete',
    })
}

// 赠送装饰
export function giveDecorateProduct(query) {
    return request({
        url: `/api/couple/decorate/product/${query.id}/give`,
        method: 'post',
        data: query
    })
}
